package com.treeroot.orderservice.order.client.DegradeFeignClient;

import com.treeroot.commonutils.exceptionhandler.MyException;
import com.treeroot.commonutils.result.R;
import com.treeroot.orderservice.order.client.Flag;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Author:treeRoot
 * @Email:553503639@qq.com
 * @Date: Create in 13:59 / 2022/6/7
 */
@Component

public class getFlagDegradeFeignClient implements FallbackFactory<Flag> {

    @Override
    public Flag create(Throwable cause) {
        return new Flag() {
            @Override
            public R updatePlaneByIdOrder(String planeId, String type,String planeType) {
                System.out.println("更新航班信息出错");
               return  null;
            }
        };
    }
}
